<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2021/1/9
  Time: 15:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

    <script>



    </script>

</head>
<body>
<div class="container">

    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="page-header">
                <h1>
                    <small>书籍列表</small>
                </h1>
            </div>
        </div>

        <div class="row">
            <div class="col-md-4 column">
                <a href="${pageContext.request.contextPath}/book/toAddPage">新增书籍</a>
            </div>
            <div class="col-md-4 column">
                <a href="${pageContext.request.contextPath}/book/allBook">显示所有书籍</a>
            </div>
            <div class="col-md-4 column">
                <form action="${pageContext.request.contextPath}/book/selBookByName" method="">
                    <input type="text" name="bookName" class="form-control" placeholder="请输入要查询的书籍名称"/>
                    <input type="submit" value="查询" class="btn btn-primary"/>
                </form>
            </div>
        </div>

    </div>

    <div class="row clearfix">
        <div class="col-md-12 column">
            <table class="table table-hover table-striped">
                <tr>
                    <td>书籍编号</td>
                    <td>书籍名称</td>
                    <td>书籍数量</td>
                    <td>书籍详情</td>
                    <td>操作</td>
                </tr>


                <c:forEach items="${list}" var="book">
                </tr>
                <td>${book.bookID}</td>
                <td>${book.bookName}</td>
                <td>${book.bookCounts}</td>
                <td>${book.detail}</td>
                <td><a href="${pageContext.request.contextPath}/book/delBook?id=${book.bookID}">删除</a>&nbsp;<a href="${pageContext.request.contextPath}/book/toUpdatePage?id=${book.bookID}">修改</a></td>
                <tr>
                </c:forEach>



            </table>
        </div>
    </div>

    <span style="color: red;font-weight: bold" id="span">${msg}</span>

</div>
</body>
</html>
